package com.xz.coursearrange.entity.request;

import com.xz.coursearrange.common.validation.AddGroup;
import com.xz.coursearrange.common.validation.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @Descripe:
 */
@Data
public class ClassAddVO implements Serializable {

    private static final long serialVersionUID = 2204170304448219769L;

    @NotNull(message = "教师ID不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer id;

    @NotBlank(message = "年级编号不能为空", groups = AddGroup.class)
    @Size(min = 2,max = 10, message = "年级编号长度不能超过10", groups = {AddGroup.class, UpdateGroup.class})
    private String gradeNo;

    @NotBlank(message = "班级编号不能为空", groups = AddGroup.class)
    @Size(min = 2,max = 10, message = "班级编号长度不能超过10", groups = {AddGroup.class, UpdateGroup.class})
    private String classNo;

    @NotBlank(message = "班级名称不能为空", groups = AddGroup.class)
    @Size(min = 2,max = 20, message = "班级名称长度不能超过20", groups = {AddGroup.class, UpdateGroup.class})
    private String className;

    @NotNull(message = "班级人数不能为空", groups = AddGroup.class)
    @Min(value = 1, message = "班级人数必须大于0", groups = {AddGroup.class, UpdateGroup.class})
    @Max(value = 1000, message = "班级人数不能超过1000", groups = {AddGroup.class, UpdateGroup.class})
    private Integer num;

//    @NotBlank(message = "班主任姓名不能为空", groups = AddGroup.class)
//    @Size(min = 1,max = 20, message = "班主任姓名不能超过20", groups = {AddGroup.class, UpdateGroup.class})
    private String realname;
}
